package cn.itcast.methodReference;

import cn.itcast.inteface.MessageInterface2;

public class Test2 {
    public static void main(String[] args) {
        MessageInterface2 messageInterface2 = () ->"培训班凉凉了";
        System.out.println(messageInterface2.getMessage());

        Test2 test2 = new Test2();
        MessageInterface2 messageInterface21 = () -> test2.objGet();
        System.out.println(messageInterface21.getMessage());

        MessageInterface2 messageInterface22 = test2::objGet;
        System.out.println(messageInterface22.getMessage());


    }
    public  String objGet(){
        return "培训班凉凉了";
    }
}
